package org.example.filter;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.extension.Activate;
import com.alibaba.dubbo.rpc.*;

/**
 * Created on 2020/4/17
 */
@Activate(group = Constants.CONSUMER)
public class PrintFilter implements Filter {

    @Override
    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
        System.out.println("Invoker URL: " + invoker.getUrl());
        return invoker.invoke(invocation);
    }
}
